import Tools.MyTool;
import UserView.UseUi;

import java.util.Scanner;

public class StudentRun {
    public static void main(String[] args) {
        System.out.println("-----------------------");
        System.out.println("**欢迎使用学生信息管理系统**");
        System.out.println("-----------------------");

        System.out.println("****请输入管理员的账号和密码登录****");
        Scanner scanner = new Scanner(System.in);
        System.out.print("账号|:");
        String  user = scanner.next();
        System.out.print("密码|:");
        String  pw = scanner.next();

        String code = MyTool.code();
        System.out.print("验证码（"+code+")|:");
        String codes = scanner.next();

        if (!codes.equals(code)){
            System.out.println("验证码错误");
        }else {
            if (user.equals("zhangqi")&& pw.equals("123456")){
                System.out.println("请选择你的业务操作");
                //生成操作界面 用户表现层
                UseUi useUi = new UseUi();
                useUi.UI();
            }else {
                System.out.println("账号或密码错误");
            }
        }
    }
}
